//
// Created by 11510 on 2024/7/4.
//

#ifndef DAY71_MUTEXLOCKGUARD_H
#define DAY71_MUTEXLOCKGUARD_H
#include "MutexLock.h"
class MutexLockGuard {
private:
    MutexLock& _mutexLock;
public:
    MutexLockGuard(MutexLock& mutexLock):_mutexLock(mutexLock){
        _mutexLock.lock();
    }
    ~MutexLockGuard(){
        _mutexLock.unlock();
    }
};


#endif //DAY71_MUTEXLOCKGUARD_H
